<?php
/**
 * @version 	$Id$
 * @author 		Luu Trong Hieu<tronghieu1012@yahoo.com>
 * @copyright 	Copyright (c) 2010 Luu Trong Hieu. All right reserved.
 * @license 	GNU/GPL. see license.php
 */

defined('IN_FLYWHEEL') or die('Restricted Access');
/**
 * fApplicationConfiguration
 * 
 * @package 	system
 * @subpackage 	config
 *
 */
class fApplicationConfiguration {
	public function initConfiguration() {
		if (fConfig::has('default_time_zone')) {
			date_default_timezone_set(fConfig::get('default_time_zone'));			
		}
		else {
			date_default_timezone_set(@date_default_timezone_get());
		}

		fConfig::load(_PROJECT_CONFIGURATION_PATH_.'config.ini', 'default', false);
		fConfig::load(_APP_CONFIGURATION_PATH_.'config.ini');
		if (fConfig::get('debug')) {
			fProfiler::getInstance()->mark('After init application configuaration', 'system.'.get_class($this));		
		}		
	}
}